﻿using System.Data;
namespace QunYing.BLL
{
	/// <summary>
	/// Category
	/// </summary>
	public partial class Category
	{
        /// <summary>
        /// 根据父ID取子类别（根元素父ID为0）
        /// </summary>
        public DataTable GetChildCategory(string parentID, string DealerID)
        {
            return dal.GetChildCategory(parentID, DealerID);
        }
        /// <summary>
        /// 根据父ID取子类别（根元素父ID为0）
        /// </summary>
        public DataTable GetChildCategoryByCache(string parentID, string DealerID)
        {
            return dal.GetChildCategoryByCache(parentID, DealerID);
        }

        /// <summary>
        /// 根据子ID取父类别
        /// </summary>
        public DataTable GetParentCategory(string childID)
        {
            return dal.GetParentCategory(childID);
        }
        /// <summary>
        /// 根据子ID取父类别
        /// </summary>
        public DataTable GetParentCategoryByCache(string childID)
        {
            return dal.GetParentCategoryByCache(childID);
        }

        /// <summary>
        /// 根据父ID取子孙类别
        /// </summary>
        public DataTable GetChildsCategory(string parentID)
        {
            return dal.GetChildsCategory(parentID);
        }

        /// <summary>
        /// 根据父ID取子孙类别
        /// </summary>
        public DataTable GetChildsCategoryByCache(string parentID)
        {
            return dal.GetChildsCategoryByCache(parentID);
        }
        /// <summary>
        /// 删除类别
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public int DelCategory(string id)
        {
            return dal.DelCategory(id);
        }
	}
}

